|
Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2: msg#00101lang.haskell.libraries
Moved to libraries@ tomasz.zielonka: > > And a String class would allow typing FastPackedString literals directly. On this last matter, you can almost do it: FPS.packAddress "haskell"# or FPS.unsafePackAddress 7 "haskell"# The latter is an O(1) op, the former performs a strlen on construction. And with the magic RULE, you get: {-# RULES "pack/packAddress" forall s# . pack (unpackCString# s#) = packAddress s# #-} such that: FPS.pack "haskell" usually gives you the right thing. Ideally I'd like a way to get the strlen from the compiler, to make O(1) packAddress using -- Don |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2: 00101, Simon Marlow |
|---|---|
| Next by Date: | Re[2]: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2: 00101, Bulat Ziganshin |
| Previous by Thread: | Re: using ghc with makei: 00101, Simon Marlow |
| Next by Thread: | Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2: 00101, Tomasz Zielonka |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |