Skip to content

Instantly share code, notes, and snippets.

@DanielG
Forked from wz1000/lexer.hs
Created June 28, 2019 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielG/e87dd59a35d9671f509fe95c52b32d1c to your computer and use it in GitHub Desktop.
Save DanielG/e87dd59a35d9671f509fe95c52b32d1c to your computer and use it in GitHub Desktop.
{-# LINE 1 "templates/GenericTemplate.hs" #-}
...
alexIndexInt16OffAddr (AlexA# arr) off =
#ifdef WORDS_BIGENDIAN
narrow16Int# i
where
i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
#else
indexInt16OffAddr# arr off -- 3307
#endif
Name arr Defined at templates/GenericTemplate.hs:60:31 at position hieroot/stage1/compiler/build/Lexer.hs:3307:22-24 doesn't occur in calculated scope [NoScope,
LocalScope templates/GenericTemplate.hs:60:36-38]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment