code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module GRIN.Rewriting.Interfaces where
import Control.Monad.Freer
data Heap -- Abstracts both store/storeless models into a hybrid heap model.
data Trace -- Models the control-flow graph. Includes commands for splitting + merging program traces based on trace partitioning. Generalise flow sensitive + context sensiti... | spacekitteh/libgrin | src/GRIN/Rewriting/Interfaces.hs | bsd-3-clause | 1,718 | 0 | 4 | 210 | 60 | 44 | 16 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
-- | A simple synthesizer
--
-- The 'runSynth' method requires GCC to be installed and the ALSA C library.
module Main where
import qualified Prelude as P
import Control.Arrow
import qualified Data.Char as Char
import Feldspar.Run
import Feldspar.Data.Validated
import Feldspar.Synch.... | emilaxelsson/feldspar-synch | examples/Synth.hs | bsd-3-clause | 4,624 | 0 | 16 | 918 | 1,142 | 591 | 551 | -1 | -1 |
{-#LANGUAGE OverloadedStrings#-}
{-
Project name: Annotate ensembl transcript to symbol (gene isoforms) using v24 gencode human gtf
Min Zhang
Date: Feb 26, 2016
Version: v0.1.0
Date: March 7, 2017
Version: v0.1.1
Fix bug, the input has EnsemblID.number format, but the number in dictionary was stripped.
Date: August ... | Min-/Ensembl2Symbol | src/Lib.hs | bsd-3-clause | 3,782 | 0 | 22 | 841 | 802 | 418 | 384 | 58 | 5 |
module XmlLex
( xmlLex -- :: String -> String -> [Token]
, xmlReLex -- :: Posn -> String -> [Token]
, posInNewCxt -- :: String -> Posn
, Posn(..)
, TokenT(..)
, Token
, Special(..)
, Section(..)
) where
-- This is a hand-written lexer for tokenising the text of an XML
-- document s... | FranklinChen/hugs98-plus-Sep2006 | packages/HaXml/bugs/panitz/XmlLex.hs | bsd-3-clause | 12,675 | 62 | 13 | 4,132 | 4,668 | 2,369 | 2,299 | 235 | 3 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
-- |
-- Module : Network.Socket.ByteString.Internal
-- Copyright : (c) Johan Tibell 2007-2010
-- License : BSD-style
--
-- Maintainer : johan.tibell@gmail.com
-- Stability : stable
-- Portability : portable
--
module Network.Socket.ByteString.Internal
(
... | jspahrsummers/network | Network/Socket/ByteString/Internal.hs | bsd-3-clause | 1,404 | 0 | 9 | 269 | 253 | 158 | 95 | 21 | 1 |
{-# LANGUAGE PatternGuards, Rank2Types, CPP #-}
module CabalBounds.Dependencies
( Dependencies(..)
, dependencies
, filterDependency
, allDependency
, dependencyIf
, filterLibrary
) where
import Control.Lens
import qualified CabalBounds.Args as A
import qualified CabalLenses as CL
import CabalBou... | dan-t/cabal-bounds | lib/CabalBounds/Dependencies.hs | bsd-3-clause | 2,295 | 0 | 11 | 411 | 517 | 287 | 230 | 46 | 1 |
module OrigTiMonad(
IM,run,--TI,KI,
KEnv,
getEnv,getTEnv,getKEnv,getIEnv,getModule,getDefaults,getStdNames,
extendts,extend,extend1,extendkts,extendEnv,extendIEnv,
inModule,inEnv,withStdNames,
env,kenv,sch,kindOf,stdName,stdSch,constrain,getConstraints,monomorphism,
monomorphismRestriction,
erro... | forste/haReFork | tools/base/TI/OrigTiMonad.hs | bsd-3-clause | 5,170 | 14 | 18 | 1,105 | 2,258 | 1,207 | 1,051 | -1 | -1 |
-- |
-- Module: $HEADER$
-- Description: Various Monad specific utilities.
-- Copyright: (c) 2013 Peter Trsko
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: portable
--
-- Variations on bind ('>>=') and 'liftM' that give reader-like feel without
... | trskop/hs-not-found | not-found/src/Control/Monad/Utils.hs | bsd-3-clause | 1,851 | 0 | 11 | 485 | 540 | 311 | 229 | 29 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
************************************************************************
* *
\section[FloatIn]{Floating Inwards pass}
* ... | gridaphobe/ghc | compiler/simplCore/FloatIn.hs | bsd-3-clause | 24,134 | 0 | 17 | 6,477 | 3,003 | 1,614 | 1,389 | 214 | 4 |
import A(x, y) = (3,4)
| roberth/uu-helium | test/parser/ImportListError2.hs | gpl-3.0 | 24 | 1 | 6 | 6 | 23 | 13 | 10 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.STS.Waiters
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. ... | fmapfmapfmap/amazonka | amazonka-sts/gen/Network/AWS/STS/Waiters.hs | mpl-2.0 | 612 | 0 | 4 | 122 | 39 | 31 | 8 | 7 | 0 |
{- |
Module : Inliner
Description : A simple heuristic inliner for FCore
Copyright : (c) 2014—2015 The F2J Project Developers (given in AUTHORS.txt)
License : BSD3
Maintainer : Jeremy <bixuanxbi@gmail.com>, Yanlin <huohuohuomumu@gmail.com>
Stability : experimental
Portability : portable
This modu... | xnning/fcore | lib/Inliner.hs | bsd-2-clause | 2,007 | 0 | 16 | 449 | 948 | 463 | 485 | 36 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
-----------------------------------------------------------------------------------------
-- |
-- Module : FRP.Yampa.Vector2
-- Copyright : (c) Antony Courtney and Henrik Nilsson, Yale University, 2003
-- License : BSD-style (see the LICENSE file i... | eigengrau/haskell-yampa | src/FRP/Yampa/Vector2.hs | bsd-3-clause | 3,835 | 0 | 9 | 737 | 824 | 439 | 385 | 47 | 1 |
-- | Utility functions useful for debugging the plugin. Some of these
-- may be unsafe to use in general.
module Control.Super.Plugin.Debug
( containsAnyOf
, containsAllOf
, containsNoneOf
, pprToStr, sDocToStr
) where
import Data.List ( isInfixOf )
import Outputable
( Outputable(..), SDoc
, showSDo... | jbracker/supermonad-plugin | src/Control/Super/Plugin/Debug.hs | bsd-3-clause | 1,233 | 0 | 8 | 223 | 235 | 141 | 94 | 19 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module Api.Mappers.User
( findByLogin
, insert
, update
) where
import Hasql (Tx, q, single)
import Hasql.Postgres (Postgres)
import Api.Types.Fields
import Api.Types.User
findByLogin :: Login -> Tx Postgres s (Maybe User)
findByLogin (Login (UserID a) (UserToken b)) = single $ [q|
SE... | cawinkelmann/api-server | lib/Api/Mappers/User.hs | mit | 1,131 | 0 | 12 | 266 | 295 | 162 | 133 | 25 | 2 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DeriveGeneric #-}
module Cryptol.Parser.LexerU... | iblumenfeld/cryptol | src/Cryptol/Parser/LexerUtils.hs | bsd-3-clause | 17,402 | 0 | 19 | 6,842 | 4,757 | 2,558 | 2,199 | 370 | 24 |
module StaticAnalysis where
import Logic
import Grothendieck
import Structured
import Data.Dynamic
staticAnalysis :: SPEC -> Maybe (Env, G_theory)
staticAnalysis sp = staticAna1 initial_theory sp
where
initial_theory = get_initial sp
get_initial sp = case sp of
Basic_spec (G_basic_spec logic _) ->
G_... | keithodulaigh/Hets | mini/StaticAnalysis.hs | gpl-2.0 | 1,827 | 0 | 17 | 551 | 665 | 321 | 344 | 44 | 7 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Configure
-- Copyright : Isaac Jones 2003-2005
-- License : BSD3
... | rimmington/cabal | Cabal/Distribution/Simple/Configure.hs | bsd-3-clause | 84,163 | 603 | 18 | 26,581 | 10,727 | 6,752 | 3,975 | 1,225 | 15 |
module D3 where
sumSquares ((x : xs)) = (x ^ pow) + (sumSquares xs)
sumSquares [] = 0
pow = 2
main = sumSquares [1 .. 4]
| mpickering/HaRe | old/testing/removeDef/D3_AstOut.hs | bsd-3-clause | 126 | 0 | 8 | 32 | 68 | 38 | 30 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Control.Concurrent (forkIO, threadDelay)
import Control.Monad.Trans (liftIO)
import Control.Concurrent.Chan
import Network.Wai.Handler.Warp (run)
import Network.Wai.Middleware.Gzip (gzip, def)
import Network.Wai
import Network.HTTP.Types ... | jberryman/wai | wai-extra/app/Main.hs | mit | 1,781 | 0 | 13 | 466 | 507 | 265 | 242 | 47 | 6 |
{-# LANGUAGE EmptyCase #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module T7669 where
data Void
foo :: Void -> ()
foo x = case x of {}
-- Should not get incomplete-pattern warning
| hferreiro/replay | testsuite/tests/deSugar/should_compile/T7669.hs | bsd-3-clause | 193 | 0 | 6 | 37 | 35 | 22 | 13 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
-- | Facilities for determining which names are used in some syntactic
-- construct. The most important interface is the 'FreeIn' class and
-- its instances, but for reasons related to the Haskell type system,
-- some cons... | ihc/futhark | src/Futhark/Representation/AST/Attributes/Names.hs | isc | 9,234 | 29 | 14 | 2,514 | 2,615 | 1,354 | 1,261 | 191 | 1 |
{-# LANGUAGE ForeignFunctionInterface,ViewPatterns,RecordWildCards #-}
-- Various routines for dealing with temporary directories and files.
module Support.TempDir(
getTempDir,
createTempFile,
fileInTempDir,
cleanTempDir,
setTempDir,
addAtExit,
withStackStatus,
wrapMain
) where
impor... | m-alvarez/jhc | src/Support/TempDir.hs | mit | 5,738 | 0 | 17 | 1,481 | 1,825 | 901 | 924 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE DeriveAnyClass, PatternSynonyms, ConstraintKinds, FlexibleContexts #-}
module Workflow.OSX.C.Types where
import Workflow.OSX.C.Extra
import Foreign (Storable(..))
import Foreign.CStorable (CStorable(..))
import Foreign.C.Types
import Data.Word
{-|
relates a Haskell ty... | sboosali/workflow-osx | workflow-osx-ffi/sources/Workflow/OSX/C/Types.hs | mit | 5,162 | 0 | 8 | 772 | 541 | 333 | 208 | 58 | 1 |
{-# LANGUAGE DuplicateRecordFields #-}
module IR.New where
import qualified Capnp.Repr as R
import Data.Word
import qualified IR.Common as C
import qualified IR.Name as Name
type Brand = C.ListBrand Name.CapnpQ
data File
= File
{ fileId :: !Word64
, decls :: [Decl]
, fi... | zenhack/haskell-capnp | cmd/capnpc-haskell/IR/New.hs | mit | 2,567 | 0 | 12 | 903 | 602 | 361 | 241 | 88 | 0 |
module Yage.Resource.YageResource
( YageResource
, module Data.Acquire
, module Control.Monad.Trans.Resource
) where
import Data.Acquire
import Control.Monad.Trans.Resource
type YageResource = Acquire
| MaxDaten/yage | src/Yage/Resource/YageResource.hs | mit | 211 | 0 | 5 | 30 | 44 | 30 | 14 | 7 | 0 |
-- Copyright (c) 2012-2014 NVIDIA Corporation. All rights reserved.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to u... | nvidia-compiler-sdk/hsnvvm | Test/llvm-gen/LLVMGen.hs | mit | 3,256 | 0 | 17 | 815 | 415 | 232 | 183 | 30 | 1 |
module Main (main) where
import System.Exit
import System.IO
import System.Console.GetOpt
import System.Environment
import Hed
version :: String
version = "0.01"
data Options = Options { optFile :: Maybe String} deriving (Show)
startOptions :: Options
startOptions = Options { optFile = Nothing }
options :: [OptDe... | aconbere/Hed | Main.hs | mit | 1,027 | 0 | 16 | 315 | 337 | 178 | 159 | 34 | 2 |
{-# htermination keysFM_GE :: FiniteMap Float b -> Float -> [Float] #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_keysFM_GE_6.hs | mit | 89 | 0 | 3 | 14 | 5 | 3 | 2 | 1 | 0 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Main.MapTests where
import Prelude hiding (choose)
import Test.Framework
import Control.Monad.Free
import Data.Text.Arbitrary ()
import qualified Main.MapTests.Update as Update
import qualified StmContainers.Map as StmMap
import qualified Focus
import qualified Data.HashMap.St... | nikita-volkov/stm-containers | test/Main/MapTests.hs | mit | 5,581 | 0 | 18 | 1,289 | 2,094 | 1,053 | 1,041 | -1 | -1 |
module Trading.Tybee.Base (
Price(..), avg,
History,
Allocation(..), buyAtPrice, sellAtPrice, valueAtPrice,
Action(..), isSell, isBuy, isHold,
Shares(..),
TradingStrategy(..),
VariableRepr(..),
OptimizableTradingStrategy(..)
) where
import Control.Monad.State (State)
---------------------
-- Types
---... | yanatan16/tybee | src/Trading/Tybee/Base.hs | mit | 3,390 | 0 | 11 | 736 | 1,216 | 653 | 563 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Scopic.RPC where
import Control.Arrow
import Control.Monad.Trans
import Data.Aeson
import Data.Text (Text)
import Network.JsonRpc.Server
import Scopic.Core.Filter
input = Required "input" :+: Required "state" :+: ()
output (a, s) = object [ "output" .= a, "state" .= s ]
w... | srijs/haskell-scopic | src/Scopic/RPC.hs | mit | 750 | 0 | 8 | 164 | 311 | 162 | 149 | 17 | 1 |
{-# htermination maximum :: [Bool] -> Bool #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_maximum_8.hs | mit | 47 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
import Data.List (delete, foldl')
import System.Environment
cmb :: (Eq a) => [a] -> [ [a] ]
cmb [] = [[]]
cmb xs = [ys | x<-xs, ys<-map (x:) (cmb (delete x xs))]
answer n = cmb [i|i<-['0'..'9']] !! (n-1)
main = do
args <- getArgs
let n = read (head args)
print $ answer n
| yuto-matsum/contest-util-hs | src/Euler/024.hs | mit | 283 | 3 | 12 | 66 | 184 | 98 | 86 | 10 | 1 |
module Solidran.Revp.DetailSpec (spec) where
import Test.Hspec
import Solidran.Revp.Detail
spec :: Spec
spec = do
describe "Solidran.Revp.Detail" $ do
describe "isReversePalindrome" $ do
it "should return true on empty string" $ do
isReversePalindrome ""
`sh... | Jefffrey/Solidran | test/Solidran/Revp/DetailSpec.hs | mit | 1,886 | 0 | 27 | 854 | 457 | 250 | 207 | 42 | 1 |
module Jelly.Prelude
( module Prelude
, module Control.Monad
, module Control.Applicative
, (>>), (<<), (—)
) where
import Prelude hiding ((>>), return, fail)
import Control.Monad hiding (liftM, liftM2, liftM3, liftM4, liftM5, ap, (>>), return, fail)
import Control.Applicative hiding ((<*), (*>))
import qualified Cont... | mtolly/jelly | src/Jelly/Prelude.hs | gpl-3.0 | 602 | 0 | 9 | 111 | 262 | 168 | 94 | 18 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ServiceCons... | brendanhay/gogol | gogol-serviceconsumermanagement/gen/Network/Google/ServiceConsumerManagement/Types/Product.hs | mpl-2.0 | 251,211 | 0 | 37 | 56,336 | 38,127 | 22,248 | 15,879 | 4,104 | 1 |
module Example.Eg61 (eg61) where
import Graphics.Radian
import ExampleUtils
d :: PlotData
d =
JSONData
"[{\"sex\":\"female\",\"env\":\"rural\",\"age\":\"50-54\",\"rate\":15.5}, \
\ {\"sex\":\"female\",\"env\":\"rural\",\"age\":\"55-59\",\"rate\":20.2}, \
\ {\"sex\":\"female\",\"env\":\"rural\",\"age\":\"60-64... | openbrainsrc/hRadian | examples/Example/Eg61.hs | mpl-2.0 | 3,547 | 16 | 18 | 841 | 677 | 379 | 298 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Bookshelves/Volumes/List.hs | mpl-2.0 | 6,258 | 0 | 21 | 1,518 | 910 | 523 | 387 | 130 | 1 |
-----------------------------------------------------------------------------------------
{-| Module : CompileSTC
Copyright : (c) Haste Developper Team 2004, 2005
License : BSD-style
Maintainer : wxhaskell-devel@lists.sourceforge.net
Stability : provisional
Portability : ... | thielema/wxhaskell | wxdirect/src/CompileSTC.hs | lgpl-2.1 | 6,679 | 0 | 13 | 2,122 | 1,809 | 948 | 861 | 110 | 12 |
{-# LANGUAGE CPP #-}
--cross-platform file locking utilizing POSIX file locking on Unix/Linux and Windows file locking
--hackage's System.FileLock doesn't support POSIX advisory locks nor locking file based on file descriptors, hence this needless rewrite
module ProjectM36.FileLock where
#if defined(mingw32_HOST_OS)
... | agentm/project-m36 | src/lib/ProjectM36/FileLock.hs | unlicense | 3,123 | 44 | 6 | 658 | 395 | 219 | 176 | 25 | 2 |
import System.Environment
import System.Directory
import System.Exit
import System.IO
import Data.List
--import Data.Either
import qualified Data.Map.Strict as M
import Data.ByteString.Char8 (pack)
-- Import in INI parser from chapter 24
-- from iniParser
import Text.Trifecta
import Data.Ini
data Args = Args { unArgs... | dmp1ce/Haskell-Programming-Exercises | Chapter 29/parseIniFiles.hs | unlicense | 1,331 | 0 | 18 | 317 | 403 | 206 | 197 | 32 | 2 |
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which ... | ideas-edu/ideas | src/Ideas/Common/View.hs | apache-2.0 | 9,554 | 0 | 12 | 2,520 | 3,374 | 1,769 | 1,605 | 187 | 2 |
-- Copyright 2018-2021 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed t... | google/hs-fin-vec | short-vec/test/Benchmark.hs | apache-2.0 | 4,511 | 0 | 15 | 768 | 1,530 | 853 | 677 | 94 | 1 |
{-# LANGUAGE GADTs,RankNTypes,DeriveFunctor #-}
module Faceted.FIORef (
FIORef,
newFIORef,
readFIORef,
writeFIORef,
) where
import Faceted.Internal
import Data.IORef
-- | Variables of type 'FIORef a' are faceted 'IORef's
data FIORef a = FIORef (IORef a)
-- | Allocate a new 'FIORef'
newFIORef :: Faceted a... | tommy-schmitz/haskell-faceted | Faceted/FIORef.hs | apache-2.0 | 1,099 | 0 | 12 | 259 | 325 | 157 | 168 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{- |
* Strict imperative For Loops, for use with mutable structures,
* while loop
* repeatWhile loop
-}
module Control.Monad.Loops () where
import Control.Monad as M
import Control.Exception (assert)
------------------------------------------
-- | use:
-- @
-- forLoopM_ (0::Int) (\< le... | griba2001/haskell-eines | src/Control/Monad/Loops.hs | bsd-2-clause | 3,781 | 0 | 13 | 1,063 | 1,378 | 713 | 665 | 55 | 3 |
{-| Module describing a node.
All updates are functional (copy-based) and return a new node with
updated value.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the f... | mbakke/ganeti | src/Ganeti/HTools/Node.hs | bsd-2-clause | 57,137 | 0 | 21 | 16,902 | 11,313 | 6,164 | 5,149 | 936 | 33 |
module Mesh where
import Graphics.GL
import Control.Monad.Trans
import Foreign
newtype VertexArrayObject = VertexArrayObject { unVertexArrayObject :: GLuint }
data Mesh = Mesh
{ meshVAO :: VertexArrayObject
, meshIndexCount :: GLsizei
}
drawMesh :: MonadIO m => Mesh -> m ()
dra... | lukexi/wboit | test/Mesh.hs | bsd-2-clause | 501 | 0 | 11 | 114 | 123 | 66 | 57 | 13 | 1 |
{-
Triangulate.hs (adapted from tess.c which is (c) Silicon Graphics, Inc)
Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de>
This file is part of HOpenGL and distributed under a BSD-style license
See the file libraries/GLUT/LICENSE
This program demonstrates polygon triangulation. Two tesselated ... | FranklinChen/hugs98-plus-Sep2006 | packages/GLUT/examples/Misc/Triangulate.hs | bsd-3-clause | 3,971 | 0 | 12 | 816 | 1,009 | 490 | 519 | 86 | 1 |
{-# LANGUAGE CPP #-}
{-
This module based on System.FilePath.Internal of file-path.
The code was copied with the permission from the author
of file-path, Neil Mitchell. Thanks!
See the copyright at the end of file.
-}
module System.EasyFile.FilePath (
-- * Separator predicates
FilePath,
pathSepara... | kazu-yamamoto/easy-file | System/EasyFile/FilePath.hs | bsd-3-clause | 28,276 | 2 | 18 | 5,850 | 3,832 | 2,121 | 1,711 | 234 | 6 |
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Test.HUnit
import Language.C.Quote.C
import qualified Language.C.Syntax as C
import qualified Language.C.Syntax
main = runTestTT tests
tests = TestList [exp_id, exp_int, exp_float, exp_char, exp_string,
exp_exp, exp_func, exp_args, exp_decl, e... | mainland/nikola | tests/quoting.hs | bsd-3-clause | 3,701 | 116 | 27 | 1,306 | 1,462 | 858 | 604 | 93 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcType]{Types used in the typechecker}
This module provides the Type interface for front-end parts of the
compiler. These parts
* treat "source types" as opaque:
newtypes, and predicates ... | gcampax/ghc | compiler/typecheck/TcType.hs | bsd-3-clause | 67,722 | 0 | 14 | 18,091 | 12,385 | 6,480 | 5,905 | -1 | -1 |
module Scheme.DataType.Misc (
SourcePos, MSP,
showSourcePos, showMSP,
) where
import Text.Parsec (SourcePos)
import Text.Parsec.Pos (sourceLine, sourceColumn, sourceName)
showSourcePos :: SourcePos -> String
showSourcePos sp =
let (line, column, sourcename) = (sourceLine sp, sourceColumn sp, sourceName sp... | ocean0yohsuke/Scheme | src/Scheme/DataType/Misc.hs | bsd-3-clause | 520 | 0 | 11 | 99 | 174 | 95 | 79 | 13 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ConstraintKinds #-}
module Futhark.Representation.Kernels.Simplif... | mrakgr/futhark | src/Futhark/Representation/Kernels/Simplify.hs | bsd-3-clause | 22,712 | 0 | 21 | 6,521 | 6,806 | 3,350 | 3,456 | 467 | 10 |
module TinyControl.Time
( diffTimeToS
, sToDiffTime
, nextTimeoutNDT
, nextTimeoutSec
, nextTimeoutSecPure
, getTimeout
, now
, toUs
) where
import Data.Time
now :: IO UTCTime
now = getCurrentTime
-- Converts seconds into microseconds
toUs :: Int -> Int
toUs s = 1000 * 1000 * (fromIntegral s)
diff... | Josh211ua/TinyControl | TinyControl/Time.hs | bsd-3-clause | 1,256 | 0 | 13 | 273 | 364 | 185 | 179 | 39 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Scoped... | UCSD-PL/RefScript | src/Language/Rsc/Visitor.hs | bsd-3-clause | 13,449 | 0 | 12 | 4,937 | 5,048 | 2,563 | 2,485 | 223 | 24 |
module CMajor where
import Haskore.Melody
import Haskore.Music
import Haskore.Basic.Duration
import Snippet
c_major = map (\x -> x 1 qn () ) [c, e, g]
c_serial = foldl1 (+:+) c_major
c_parallel = chord c_major
main = do
render_to "c_major_serial.midi" c_serial
render_to "c_major_parallel.midi" c_parallel | nfjinjing/haskore-guide | src/c_major.hs | bsd-3-clause | 318 | 0 | 9 | 54 | 100 | 55 | 45 | 11 | 1 |
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Monitor
-- Description : Layout modfier for displaying some window (monitor) above other windows.
-- Copyright : (c) Roman C... | xmonad/xmonad-contrib | XMonad/Layout/Monitor.hs | bsd-3-clause | 6,318 | 0 | 15 | 1,497 | 994 | 562 | 432 | 67 | 2 |
import Equation
main = do
putStrLn $ show(newRaph1.deriv $ [-8,12,-6,1]) | ankeshs/numerikell | tmp/proc.hs | bsd-3-clause | 74 | 0 | 12 | 11 | 44 | 24 | 20 | 3 | 1 |
{-# OPTIONS -Wall #-}
module TuringMachine.Models.TM4 (
mach
) where
import Basic.Types (Pointed(..))
import Basic.MemoryImpl
import TuringMachine.State
import TuringMachine.Machine
--------------------------------------------------------------------------
--------------------------specilized model operations & ... | davidzhulijun/TAM | TuringMachine/Models/TM4.hs | bsd-3-clause | 1,270 | 0 | 8 | 193 | 406 | 238 | 168 | 24 | 1 |
module Miso.JSBits where
| dmjio/miso | src/Miso/JSBits.hs | bsd-3-clause | 25 | 0 | 3 | 3 | 6 | 4 | 2 | 1 | 0 |
module MaybeHero.WorldLoader (
parseWorldFromFile
) where
import qualified MaybeHero.Scenery as S
import qualified MaybeHero.Room as R
import qualified MaybeHero.World as W
import qualified MaybeHero.Inventory as I
import qualified Data.Either as Either
import MaybeHero.Yaml ((££), (£), (£!), Parseable, ParseError, ... | gtrogers/maybe-hero | src/MaybeHero/WorldLoader.hs | bsd-3-clause | 1,477 | 0 | 12 | 307 | 477 | 272 | 205 | 44 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
module Graphics.Task9.Config where
-- internal
import Graphics.Task9.Types
import Graphics.Task9.Utils
-- Nijie
import Web.Nijie
import Web.Nijie.Types
import Web.Nijie.Login
-- gtk
import Graphics.UI.Gtk (AttrOp((:=), ... | Axiomatic-/Task9 | Graphics/Task9/Config.hs | mit | 3,070 | 0 | 8 | 741 | 284 | 216 | 68 | 25 | 0 |
module Test.Infrastructure.Generator (
-- * Generator model and corresponding generators
GeneratorModel(..)
, genChainUsingModel
, genInductiveUsingModel
-- * Specific models
-- ** Simple model
, simpleModel
-- ** Cardano
, cardanoModel
) where
import Universum
import qualified... | input-output-hk/pos-haskell-prototype | wallet/test/unit/Test/Infrastructure/Generator.hs | mit | 4,822 | 0 | 12 | 1,352 | 788 | 451 | 337 | -1 | -1 |
-- Ignore warnings about using deprecated byLabel/fileByLabel functions
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-... | geraldus/yesod | yesod-test/test/main.hs | mit | 28,719 | 2 | 24 | 9,930 | 6,195 | 2,874 | 3,321 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, DeriveFunctor #-}
module IHaskell.Flags (
IHaskellMode(..),
Argument(..),
Args(..),
LhsStyle(..),
NotebookFormat(..),
lhsStyleBird,
parseFlags,
help,
) where
import IHaskellPrelude
import qualified Data.Text as T
import qualified Data.Text.... | thomasjm/IHaskell | src/IHaskell/Flags.hs | mit | 7,622 | 0 | 15 | 2,002 | 1,772 | 954 | 818 | 143 | 5 |
siblings = 3
| roberth/uu-helium | test/parser/StrategiesKeyword3.hs | gpl-3.0 | 14 | 0 | 4 | 4 | 6 | 3 | 3 | 1 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeReservedInstancesOfferings.hs | mpl-2.0 | 14,739 | 0 | 15 | 2,973 | 1,851 | 1,108 | 743 | 198 | 1 |
module Paper.Util.FileData(
FileData(..), getFileData
) where
import Control.Monad
import Data.List
import System.Directory
import System.FilePath
data FileData = FileData
{directory :: FilePath -- ^ All files must reside in one directory
,mainFile :: FilePath -- ^ The main file
,ar... | saep/neil | src/Paper/Util/FileData.hs | bsd-3-clause | 2,550 | 0 | 14 | 781 | 797 | 409 | 388 | 56 | 4 |
{-# LANGUAGE MagicHash, NoImplicitPrelude, TypeFamilies, UnboxedTuples,
MultiParamTypeClasses, RoleAnnotations, CPP, TypeOperators,
PolyKinds #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Types
-- Copyright : (c) The University ... | ezyang/ghc | libraries/ghc-prim/GHC/Types.hs | bsd-3-clause | 18,898 | 19 | 9 | 5,643 | 855 | 579 | 276 | -1 | -1 |
module Deppy.Core where
import ClassyPrelude
import Bound
import Data.Deriving (deriveEq1, deriveOrd1, deriveRead1, deriveShow1)
import Data.Maybe (fromJust)
import Data.Set (isSubsetOf)
import qualified Data.Set as Set
import Numeric.Natural
type Typ = Exp
data Exp a
= Var a
-- types
| Typ
| Fun (Abs a)
... | jfranklin9000/urbit | pkg/hs/proto/lib/Deppy/Core.hs | mit | 8,879 | 0 | 22 | 2,948 | 3,967 | 1,943 | 2,024 | -1 | -1 |
{-# LANGUAGE BangPatterns, CPP, FlexibleInstances, TypeFamilies,
TypeSynonymInstances, GADTs #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-} -- Imports internal modules
#endif
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-warnings-deprecations #-}
-- |
-- Module : Data.Attoparsec.ByteString.Cha... | Fuuzetsu/haddock | haddock-library/vendor/attoparsec-0.13.1.0/Data/Attoparsec/ByteString/Char8.hs | bsd-2-clause | 14,736 | 0 | 12 | 3,045 | 2,137 | 1,292 | 845 | 227 | 1 |
module RecordFunctionPatternMatch where
data Person = Person String String Int
main :: Fay ()
main = putStrLn (foo (Person "Chris" "Done" 14))
foo (Person "Chris" "Done" 13) = "Foo!"
foo (Person "Chris" "Barf" 14) = "Bar!"
foo (Person "Chris" "Done" 14) = "Hello!"
foo _ = "World!"
| beni55/fay | tests/recordFunctionPatternMatch.hs | bsd-3-clause | 285 | 0 | 9 | 50 | 113 | 58 | 55 | 8 | 1 |
{- |
Module : $Header$
Description : keywords for composition tables
Copyright : (c) Christian Maeder DFKI 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
-}
module CASL.CompositionTable.Keywords where
algebrai... | mariefarrell/Hets | CASL/CompositionTable/Keywords.hs | gpl-2.0 | 1,455 | 0 | 4 | 188 | 188 | 114 | 74 | 37 | 1 |
module AStack00001( Stack, push, pop, top, size ) where
data Stack a = Empty
| MkStack a (Stack a)
push :: a -> Stack a -> Stack a
push x s = MkStack x s
size :: Stack a -> Int
size s = length (stkToLst s) where
stkToLst Empty = []
stkToLst (MkStack x s) =... | charleso/intellij-haskforce | tests/gold/parser/AStack00001.hs | apache-2.0 | 569 | 0 | 11 | 213 | 243 | 127 | 116 | 14 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
-- the content concept of an event
-- core questions: when did this event happen? what happened before? what participants does the event have?
-- events are instantiated process portions with fields, objects, and networks as participants
-- an e... | liangcun/ConceptsOfSpatialInformation | extras/CoreConceptsHs Backup/Event.hs | apache-2.0 | 1,106 | 0 | 10 | 192 | 189 | 104 | 85 | -1 | -1 |
module Scope1 where
{- g3 :: Num a => (a -> [Char] ) -> ([Char], [Char] ) -}
g3 n [] = ([], [])
g3 n ((x : xs))
| n == 0 = ("", xs)
| otherwise = (x : ls, rs)
where
ls = fst $ g3 (n - 1) xs
rs = snd $ g3 (n - 1) xs
g1 :: Int -> String -> String
g1 n [] = []
g1 n (x:xs)
| n == 0 = ""
| ot... | kmate/HaRe | old/testing/merging/Scope1.hs | bsd-3-clause | 536 | 0 | 10 | 225 | 294 | 152 | 142 | 19 | 1 |
module Front2Stratego(module Tr) where
import Prop2Stratego as Tr
--import Base2Stratego as Tr
| forste/haReFork | tools/Phugs/Front2Stratego.hs | bsd-3-clause | 95 | 0 | 4 | 12 | 16 | 12 | 4 | 2 | 0 |
import Control.Parallel
import Control.Parallel.Strategies
import Control.Exception
import Data.Time.Clock
import Text.Printf
import System.Environment
-- <<fib
fib :: Integer -> Integer
fib 0 = 1
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
-- >>
-- <<main
main = do
[n] <- getArgs
let test = [test1,test2,test3,test4]... | lywaterman/parconc-examples | rpar.hs | bsd-3-clause | 933 | 0 | 13 | 223 | 447 | 221 | 226 | 40 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-@ LIQUID "--no-termination" @-}
module Class4 where
import Language.Haskell.Liquid.Prelude
class Frog a where
mkInt :: a -> Int
mkInt _ = liquidAssert (0 > 1) 10
{-@ class Frog a where
mkInt :: a -> Int
@-}
instance Frog Int where
| mightymoose/liquidhaskell | tests/neg/Class4.hs | bsd-3-clause | 288 | 0 | 9 | 63 | 60 | 34 | 26 | 7 | 0 |
{-# LANGUAGE Rank2Types, TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving #-}
module Bug2 where
import Control.Applicative
newtype ReaderT r m a = ReaderT { runReaderT :: r -> m a }
instance Functor f => Functor (ReaderT r f) where
fmap f m = ReaderT $ (fmap f) . run... | lukexi/ghc | testsuite/tests/perf/compiler/T3064.hs | bsd-3-clause | 2,980 | 0 | 104 | 624 | 1,042 | 544 | 498 | 47 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MagicHash, UnliftedFFITypes #-}
module T7575 where
import GHC.Prim
import GHC.Word
import GHC.Types
foreign import ccall unsafe "hs_eqWord64" dummy_eqWord64# :: Word64# -> Word64# -> Bool
check :: Word64 -> Word64 -> Bool
check (W64# x#) (W64# y#) = dummy_eqWord64# x# ... | urbanslug/ghc | testsuite/tests/llvm/should_compile/T7575.hs | bsd-3-clause | 371 | 0 | 7 | 62 | 105 | 57 | 48 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Playing with the Turtle library.
module PWTurtles where
import Turtle
-- Some exercises from the slides:
tuple :: Pattern (Int, Int)
tuple = do
"("
n <- decimal
","
m <- decimal
")"
return (n, m)
| capitanbatata/functional-systems-in-haskell | fsh-exercises/src/PWTurtles.hs | mit | 253 | 0 | 8 | 59 | 64 | 34 | 30 | 11 | 1 |
module Main where
import MonadLine
import Segments
main = displayAll
| schnommus/monadline | Main.hs | mit | 71 | 0 | 4 | 12 | 15 | 10 | 5 | 4 | 1 |
{-# LANGUAGE ExistentialQuantification, ViewPatterns #-}
module Assets.Manager(
ResourceManager()
, emptyResourceManager
, addNewFileSystemPack
, getResource
) where
import Prelude hiding (lookup)
import Data.HashMap
import qualified Assets.ResourcePack as Pack
import Assets.Archive
import Assets.FileSy... | NCrashed/sinister | src/client/Assets/Manager.hs | mit | 1,853 | 0 | 15 | 299 | 564 | 300 | 264 | 43 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Zendesk.User
( createUser
, getUsers
, User(..)
) where
import Control.Monad (liftM)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Logger (MonadLogger(..))
import Control.Monad.Reader (asks)
import Control.Monad.Trans (lift)... | VictorDenisov/zendesk-api | src/Zendesk/User.hs | mit | 2,887 | 0 | 16 | 738 | 792 | 458 | 334 | 76 | 1 |
import State
-- Should print "10"
-- Runs incrementByTen given the initial state of 0
main = print $ evalState 0 incrementByTen
incrementByTen = do
-- increment state 10 times
times 10 increment
-- return state
get
times :: Monad m => t -> m a -> m [a]
times n action = sequence $ take 10 $ repeat action
--... | raimohanska/Monads | challenges/State/IncrementBy10.hs | mit | 427 | 0 | 9 | 100 | 116 | 58 | 58 | 10 | 1 |
{-# LANGUAGE DeriveFunctor #-}
module Preloaded where
newtype Coroutine r u d a = Coroutine { runCoroutine :: (Command r u d a -> r) -> r } deriving (Functor)
data Command r u d a =
Done a
| Out d (Coroutine r u d a)
| In (u -> Coroutine r u d a) deriving Functor
| delta4d/codewars | kata/coroutines/Preloaded.hs | mit | 272 | 0 | 10 | 66 | 105 | 63 | 42 | 7 | 0 |
module H6502
(
H6502T(..),
executeInstruction,
tryTriggerIRQ,
triggerNMI,
defaultState,
withH6502,
H6502Environment(..)
)
where
import Data.Array
import Data.Bits
import H6502.Env
import H6502.OpcodeMap
import H6502.State
import H6502.Trans
import H6... | mniip/h6502 | src/H6502.hs | mit | 1,525 | 0 | 13 | 467 | 415 | 202 | 213 | 49 | 2 |
module Language.Dash.IR.Opcode (
Opcode (..)
, EncodedFunction(..)
) where
import Language.Dash.IR.Data
data EncodedFunction = EncodedFunction {
cfOpcodes :: [Opcode]
}
deriving Show
-- TODO should we express known and unknown functions through separate types
-- or data constructors?
data Opcode =
OpcRet... | arne-schroppe/dash | src/Language/Dash/IR/Opcode.hs | mit | 1,960 | 0 | 9 | 482 | 380 | 228 | 152 | 47 | 0 |
{-# htermination ap :: Monad m => m (a -> b) -> m a -> m b #-}
import Monad
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Monad_ap_1.hs | mit | 76 | 0 | 3 | 20 | 5 | 3 | 2 | 1 | 0 |
-- :a utils.lhs
-- :a language.lhs
module Lambda where
import Utils
import Language
type AnnExpr a b = (b, AnnExpr' a b)
data AnnExpr' a b = AVar Name
| ANum Int
| AConstr Int Int
| AAp (AnnExpr a b) (AnnExpr a b)
| ALet Bool [AnnDefn a b] (AnnExpr... | binesiyu/ifl | book/lambda.hs | mit | 24,663 | 336 | 11 | 6,563 | 7,550 | 4,228 | 3,322 | -1 | -1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.CanvasPath
(closePath, moveTo, lineTo, quadraticCurveTo, bezierCurveTo, arcTo,
rect, arc, ellipse, Canvas... | ghcjs/jsaddle-dom | src/JSDOM/Generated/CanvasPath.hs | mit | 4,893 | 0 | 16 | 1,037 | 1,356 | 738 | 618 | 91 | 1 |
import Test.Hspec
-- Reverse Polish Notation Resolver
-- For more info, check: https://en.wikipedia.org/wiki/Reverse_Polish_notation
solveRPN :: (Num a, Read a) => String -> a
solveRPN = head . foldl solve [] . words
where
solve (x:y:xs) "+" = (y + x):xs
solve (x:y:xs) "-" = (y - x):xs
solve (x... | baldore/haskell-99-exercises | extra/reverse-polish-notation.hs | mit | 744 | 0 | 11 | 195 | 277 | 147 | 130 | 15 | 4 |
{-# LANGUAGE TemplateHaskell, FlexibleInstances #-}
module Network.Google.ApiIO.Generators where
import Data.Aeson.Types
import Network.HTTP.Types (StdMethod(..))
import Language.Haskell.TH
import Language.Haskell.TH.Lift (deriveLift)
import qualified Networ... | georgeee/haskell-google-apiIO | Network/Google/ApiIO/Generators.hs | mit | 3,313 | 3 | 12 | 1,358 | 416 | 239 | 177 | 43 | 1 |
module Data.FiniteList where
{--
Okay, I got bored counting the length of finite lists in Haskell. I mean,
FORTH had the right idea ... in 1970: Strings (of any type of element) should
have the length embedded, so lengthV is an O(1) operation
SHEESH!
--}
import Data.Maybe (fromMaybe)
-- below import available via 1... | geophf/1HaskellADay | exercises/HAD/Data/FiniteList.hs | mit | 2,232 | 0 | 12 | 482 | 414 | 223 | 191 | 19 | 2 |
module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.BrowserId (authBrowserId)
import Yesod.Default.Util (addStaticContentExternal)
import Yesod.Core.Types (Logg... | darthdeus/reedink | Foundation.hs | mit | 6,083 | 0 | 18 | 1,438 | 842 | 450 | 392 | -1 | -1 |
foldl' f y (x:xs) = f y x:foldl' f y xs
| srijanshetty/haskell-sample | fold.hs | gpl-2.0 | 40 | 0 | 7 | 11 | 36 | 17 | 19 | 1 | 1 |
module Utility(isAlpha,toUpper,member,addVar,addVars,setSub,inter,subst,bind) where
import Data.Char (ord,chr)
isAlpha :: Char -> Bool
isAlpha c = (c >= 'a') && (c <= 'z')
toUpper :: Char -> Char
toUpper c = chr(ord(c)+ord('A')-ord('a'))
member :: Char -> [Char] -> Bool
member _ [] = False
member x (c:rest) =
... | josecastro/lambda | Utility.hs | gpl-2.0 | 1,539 | 0 | 12 | 412 | 825 | 469 | 356 | 45 | 6 |
module Paths_typed_Lambda_Calculus (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOExcept... | nastya13/typed-Lambda-Calculus | dist/build/autogen/Paths_typed_Lambda_Calculus.hs | gpl-3.0 | 1,661 | 0 | 10 | 182 | 371 | 213 | 158 | 28 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.